# -*- coding: utf-8 -*-
"""
------------------------------------------------------------------------------
    File Name:  del_files
    Author   :  wanwei1029
    Date     :  2018/10/22
    Desc     :
------------------------------------------------------------------------------
"""
import os


def del_special_files(base_path):
    dir_list = os.listdir(base_path)
    count = 0
    for dir in dir_list:
        if os.path.isdir(os.path.join(base_path, dir)):
            del_special_files(os.path.join(base_path, dir))
        else:
            file_name = dir[3:]
            if dir.find("第", 3) != -1:
                # print(dir)
                count += 1
    print(count)


def demo():
    """
    """
    base_path = "E:\\nas\\spider\\aikantxt\\1-1000\\"
    del_special_files(base_path)


if __name__ == '__main__':
    test_method = "demo"
    if test_method == "demo":
        demo()
